package com.hankai.dao;

import com.hankai.pojo.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int checkUsername(@Param("username") String username);
    int checkEmail(@Param("email") String email);

    User selectLogin(@Param("username") String username,@Param("password") String password);

    String getQuertionByUsername(@Param("username") String username);

    int checkAnswer(@Param("username") String username, @Param("question") String question,@Param("answer") String answer);

    int checkPassword(@Param("password") String password, @Param("id") Integer id);

    int checkEmailById(@Param("email") String email, @Param("id") Integer id);
}